<?php

include('../../common.php');
if($_SESSION['log_islogin'] == 'yes' ){

	$trnID = intval(mysql_real_escape_string($_GET['trnID']));
	$perID = intval(mysql_real_escape_string($_GET['perID']));
	$remarks = mysql_real_escape_string($_GET['remarks']);

	if($trnID != "" &&  $perID != "") {
		$sqlInsertPTD= "INSERT INTO person_transport_delivering 
								(ptd_person_per_id,ptd_trn_id,
									ptd_date_assign_driver,ptd_remarks,
									ptd_created_date,ptd_created_by) 
								VALUES
								('$perID','$trnID',
								 NOW(),'$remarks',
								 NOW(),'$_SESSION[log_userlogin_id]')";
		$resInsertPTD = $db->sql_query($sqlInsertPTD);
		
		if($resInsertPTD)
			echo '1';
		else
			echo '0';
	}else{
		echo '0';
	}
}else{
	echo 'Dude!';
}
?>